package cn.loioi.util.page.datatable.request;

import cn.loioi.util.page.datatable.DataTableUitl;

/**
 * <br>
 * (c) Copyright 2016 by <br>
 * @description :DataTable 请求查询 <br>
 * @file_name :DataTableSearch.java <br>
 * @system_name :cmp-web <br>
 * @author :yyzh <br>
 * @创建时间 :2016年8月24日 下午4:09:11
 */
public class DataTableSearch {

	private String value;
	private Boolean regex;

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public Boolean getRegex() {
		return regex;
	}

	public void setRegex(Boolean regex) {
		this.regex = regex;
	}

	public void setValue(String[] key, String join) {
		setValue(key[1], join);
	}

	public void setValue(String key, String value) {
		if ("value".equals(key)) {
			this.value = value;
		} else if ("regex".equals(key)) {
			this.regex = DataTableUitl.parseBoolean(value);
		}
	}

}
